package com.xcc.annotation.ioc.config;

import com.xcc.annotation.ioc.bean.Car;
import com.xcc.annotation.ioc.bean.Color;
import com.xcc.annotation.ioc.bean.Dog;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;

@Import({Demo04_BeanPostProccessor.class})
public class Demo04_BeanLifeCycle {

    @Bean(initMethod = "init",destroyMethod = "destroy")
    public Car car() {
        return new Car();
    }

    @Bean
    public Dog dog() {
        return new Dog();
    }

    @Bean
    public Color color() {
        return new Color();
    }

}
